<div class="con-menu">
    <ul class="menulist">
        <?php foreach($cat_list as $item) { ?>
        <li class="menuli">
            <a href="###" <?php if ($cat2_id == $item['id']) { ?>class="on"<?php } ?>><?php echo $item['name']; ?></a>
            <?php if (isset($item['sub_cat_list']) && !empty($item['sub_cat_list'])) { ?>
            <dl class="menusub">
                <?php foreach($item['sub_cat_list'] as $subItem) { ?>
                    <dd><a href="<?php echo U('Service/index', array('cat2_id' => $item['id'], 'cat_id' => $subItem['id'])); ?>" <?php if ($cat_id == $subItem['id']) { ?>class="on"<?php } ?>>- <?php echo $subItem['name']; ?></a></dd>
                <?php } ?>
            </dl>
            <?php } ?>
        </li>
        <?php } ?>
    </ul>
</div>